#include "device.h"

TDevice::TDevice(QString iName)
{
	Name = iName;
	Power = 0;
}

bool DeviceCompareFunc(TDevice &Dev1,TDevice &Dev2)
{
	float Dev1Real = 0,Dev2Real = 0;
	if (Dev1.m_is_connected)
		Dev1Real = Dev1.Power;
	if (Dev2.m_is_connected)
		Dev2Real = Dev2.Power;
	return (Dev1Real > Dev2Real);
}